function fig_RioTinto_welfare(DateVec, ratios, totalWelfare, optfig)

if optfig.plotfig == 1
    
    [fontname,dimension,lw,folder,color,style,marker,markersize,fontsize_tit,fontsize_ax,fontsize_lab,fontsize_leg] = fn_optfig(optfig);
    
    % define plotting variables
    x = DateVec(261:end,1);
    y = ratios;
    z = abs(totalWelfare);
    
    f0 = figure('Units','inches','Position',dimension);
    
    left_color = [0 0 0];
    right_color = [0 0 0];
    set(f0,'defaultAxesColorOrder',[left_color; right_color]);
    
    yyaxis left
    %     plot(x,ones(size(x)),'Color',[0 0 0],'LineStyle',style{3},'LineWidth',1); hold on;
    plot(x,y,'Color',color{2},'LineStyle',style{2},'LineWidth',lw);
    xlabel('Date','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname)
    ylabel('Deviation from Parity','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname)
    
    yyaxis right
    plot(x, z/1e6,'Color', color{5},'LineStyle',style{1},'LineWidth',lw);
    ylabel('Welfare Gains (millions of USD)','interpreter','latex','FontSize',fontsize_lab,'FontName',fontname)
    ytickformat('$%gM')
    title('Welfare Gains: Rio Tinto', 'interpreter','latex','FontSize',fontsize_tit,'FontName',fontname)
    grid; axis tight; box off;
    
    legendCell = {'Deviation (left)', 'Welfare Gains (right)'};
    legend(legendCell,'interpreter','latex','FontSize',fontsize_leg,'FontName',fontname,'Location','best')
    legend boxoff
end

name = '11_WelfareRioTinto';
print(f0,'-depsc','-painters','-noui','-r600',[folder,name,'.eps'])

end